package cn.edu.zut.hhr.mapper;

import cn.edu.zut.hhr.entity.Article;
import cn.edu.zut.hhr.entity.dos.Archive;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 * 文章表 Mapper 接口
 * </p>
 *
 * @author HHR
 * @since 2021-08-21
 */
public interface ArticleMapper extends BaseMapper<Article> {

    List<Archive> getListArchives();

    void updateMany(@Param("list") List<Article> list);

    List<Article> getArticleListByTime(@Param("iPage") IPage<Article> iPage, @Param("year") Integer year, @Param("month") Integer month);

    IPage<Article> selectArtByUid(@Param("uid") Long uid,@Param("iPage") IPage<Article> pg);
}
